using System.Collections.Generic;
using System.Collections.ObjectModel;
using Microsoft.TeamFoundation.Build.Client;

namespace Bazookabird.Common
{
    public class BuildDefinitionWrapperCollection : ObservableCollection<BuildDefinitionWrapper> 
    {
        public static BuildDefinitionWrapperCollection Create(IEnumerable<IBuildDefinition> buildDefinitions)
        {
            var collection = new BuildDefinitionWrapperCollection();
            foreach (var iBuild in buildDefinitions)
            {
                collection.Add(new BuildDefinitionWrapper(iBuild));
            }
            return collection;
        }
    }
}